<extend name="common:base" />
<block name="body">

    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-title">
                        <h5>预约管理</h5>
                    </div>
                    <style>
                        .form-group{margin-top: 3px;}
                    </style>
                    <div class="ibox-content">

                        <form role="form" name="searchform" method="get" class="form-inline" >

                            <div class="form-group">
                                <label >订单编号</label>
                                <input class="form-control" type="text" name="order_sn" value="{$order_sn}">
                            </div>
                            <div class="form-group">
                                <label >姓名</label>
                                <input class="form-control" type="text" name="real_name" value="{$search['real_name']}">
                            </div>
                            <div class="form-group">
                                <label >电话</label>
                                <input class="form-control" type="text" name="tel" value="{$search['tel']}">
                            </div>
                            <div class="form-group">
                                <label >入住基地</label>
                                <input class="form-control" type="text" name="product_name" value="{$search['product_name']}">
                            </div>
                            <div class="form-group">
                                <label >预约时间</label>
                                <input class="form-control" type="text" name="s_yuyue" value="{$search['s_yuyue']}" onClick="WdatePicker()">
                                <input class="form-control" type="text" name="e_yuyue" value="{$search['e_yuyue']}" onClick="WdatePicker()">
                            </div>
                            <div class="form-group">
                                <label >入住时间</label>
                                <input class="form-control" type="text" name="s_ruzhu" value="{$search['s_ruzhu']}" onClick="WdatePicker()">
                                <input class="form-control" type="text" name="e_ruzhu" value="{$search['e_ruzhu']}" onClick="WdatePicker()">
                            </div>

                            <div class="form-group">
                                <button type="submit" class="btn btn-outline btn-success" >搜索</button>
                            </div>


                        </form>
                        <p style="line-height: 10px;"></p>
                        <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>id</th>
                                <th>订单编号</th>
                                <th>会员id</th>
                                <th>会员姓名</th>
                                <th>入住房间</th>
                                <th>开始时间</th>
                                <th>结束时间</th>
                                <th>消费积分</th>
                                <th>状态</th>
                                <php>if($auth->check( 'admin/shoporder/detail',  session('uid') )){</php>
                                <th>操作</th>
                                <php>}</php>
                            </tr>
                            </thead>
                            <tbody id="formlist">
                            <volist name="data.list" id="vo">
                                <tr class="odd gradeA">
                                    <td>{$vo.id}</td>
                                    <td>{$vo.order_sn}</td>
                                    <td>{$vo.mid}</td>
                                    <td>{:getFieldShow('s_member','real_name',array('id'=>$vo['mid']))}</td>
                                    <td>{:getFieldShow('s_product','name',array('id'=>$vo['product_id']))}</td>
                                    <td>{$vo.begin_time}</td>
                                    <td>{$vo.end_time}</td>
                                    <td>{$vo.total}</td>
                                    <td>{:getConfig('order_status',$vo['status'])}</td>
                                    <php>if($auth->check( 'admin/shoporder/detail',  session('uid') )){</php>
                                    <td class="center">
                                        <php>if($auth->check( 'admin/shoporder/detail',  session('uid') )){</php>
                                        <a href="/admin/shoporder/detail?id={$vo.id}" class="badge badge-primary">详情</a>&nbsp;&nbsp;
                                        <php>}</php>
                                        <php>if($auth->check( 'admin/shoporder/del',  session('uid') )){</php>
                                        <a href="javascript:void(0);" class="badge badge-danger" onclick="confirm_del(this)" data-url="{:u('del')}" data-id="{$vo.id}" data-msg="确定要删除吗">删除</a>&nbsp;&nbsp;
                                        <php>}</php>
                                    </td>
                                    <php>}</php>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                         </div>
                        <div class="col-lg-12" style="float: none">
                            <div class="pagination" >共{$data.count}条</div>
                            <ul class="pagination" id="page" style="float: right">{$data.page}</ul>
                        </div>
                    </div>
                </div>
            </div>

        </div>

    </div>
    </div>
</block>


